import request from '@/config/axios'
import { scanPage } from './type'
//获取扫描策略分页
export const getScanPolicyTemplatePage = async (params: scanPage) => {
  return await request.getOriginal({ url: `/amp/scan-policy-template/page`, params })
}

// 查询扫描策略模板详情
export const getScanPolicyTemplate = async (id: string) => {
  return await request.get({ url: `/amp/scan-policy-template/get?id=` + id })
}

// 新增扫描策略模板
export const createScanPolicyTemplate = async (data) => {
  return await request.postOriginal({ url: `/amp/scan-policy-template/create`, data })
}

// 修改扫描策略模板
export const updateScanPolicyTemplate = async (data) => {
  return await request.postOriginal({ url: `/amp/scan-policy-template/update`, data })
}

// 删除扫描策略模板
export const deleteScanPolicyTemplate = async (data: string[]) => {
  return await request.postOriginal({ url: `/amp/scan-policy-template/batch-delete`, data })
}

// 导出扫描策略模板 Excel
export const exportScanPolicyTemplate = async (params) => {
  return await request.post({ url: `/amp/scan-policy-template/export-excel`, params })
}